$(document).ready(function() {
	$('#submit_form').click(function() {
		var __editForm = $('#form_edit');
		var objForm = {
			__formPassword: $("input[name='password']", __editForm),
			__formPassword1: $("input[name='password1']", __editForm)
		}

		if (0 == objForm.__formPassword.val().length) {
			window.alert('用户名不能为空！');
			return false;
		}

		if (objForm.__formPassword.val() != objForm.__formPassword1.val()) {
			window.alert('两次输入的密码不一致，请重新输入！');
			return false;
		}

		$.ajax({
			type: "POST",
			url: "/Person/info",
			data: {
				"password": objForm.__formPassword.val()
			},
			success: function(data) {
				window.alert(data.info);
				if (true === data.status) window.location = "/Person/info";
			}
		});
		return false;
	});
})